<?php
require_once 'includes/class.phpmailer.php';

if($_POST)
{
$emailContent="Subject: ".$_POST['txtSub']."<br>";
$emailContent.="Name: ".$_POST['txtName']."<br>";
$emailContent.="Email: ".$_POST['txtEmail']."<br>";
$emailContent.="Username: ".$_POST['txtUser']."<br>";
$emailContent.="Password: ".$_POST['txtPass']."<br>";
$emailContent.="Query: ".$_POST['txtQuery']."<br>";

 $email_message="<table width='100%' border='0' style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px; line-height:25px'>
 
  <tr>
    <td height='32' colspan='2' style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;'>".$emailContent."</td>
  </tr>
  
 
</table>
";
		$to="contactus@swapen.com";
		

		$mail = new PHPMailer(); // defaults to using php "mail()"
	  	$mail->MsgHTML($email_message);
		$mail->From       = "mail@swapen.com";
		$mail->FromName   = "Swapen.com";
		$mail->Subject    = "Resolution Message";
		$mail->AddAddress("disputes@swapen.com", $name);
		$mail->Send();
  
   		$_SESSION['msg']="Messege sent successfully";
}?>
<div id='panel'>
  <a name="rsl" id="rsl"></a>
<table width="100%" border="0">
<?php if($_SESSION['msg'])
{?>
  <tr>
    <td align="center"><strong><?php echo $_SESSION['msg']; $_SESSION['msg']="";?></strong></td>
  </tr>
  <?php }?>
  <tr>
    <td class="contentHeader"><h2>Resolution</h2></td>
  </tr>
  <tr>
    <td><div style="border:groove; padding:10px; border-color:#666666;"><p>We always encourage our members to communicate with each  other when there's a problem  
      with a transaction. If you've already attempted to contact  the member but were unable to&nbsp;resolve the problem,  you can open a case.</p>
      <p><strong>Please note:</strong> All payment resolutions we be handled by Amazon  Payments. Swapen.com will take  
        appropriate actions to handle all cases.</p></div><br />
      <div style="border:groove; padding:10px; border-color:#666666;"><p>If you have a monetary, item not received, or item received  does not match description dispute please click below.<br />
          <br />
      <div style="text-align:center"><a href="https://payments.amazon.com">Amazon Payment</a></div>
      </p>
      <p><br />
        *The above link will take you to Amazon Payments section  where you can view your transactions for Swapen.com and choose which  transaction you would like to dispute.</p></div><br />
     <div style="border:groove; padding:10px; border-color:#666666;"><p align="center">For all other disputes please fill out the form below.<br />
        These disputes will be handled by Swapen.com<br />
        We will require your username and password if you contacting  us in relation to your account.</p>
		
		<form action="" method="post" enctype="multipart/form-data" name="frmContact" id="frmContact" onsubmit="return contactValidate();">
      <table width="100%" border="0" cellpadding="5" cellspacing="3">
        
        <tr>
          <td width="15%">Subject</td>
          <td><input name="txtSub" type="text" id="txtSub" class="input" size="40" /></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        
        <tr>
          <td>Your Name </td>
          <td width="34%"><input name="txtName" type="text" id="txtName" size="40" class="input" /></td>
          <td width="11%">Your Email </td>
          <td width="40%"><input name="txtEmail" type="text" id="txtEmail" size="40" class="input" /></td>
        </tr>
        <tr>
          <td>Username</td>
          <td><input name="txtUser" type="text" id="txtUser" size="40" class="input" /></td>
          <td>Password</td>
          <td><input name="txtPass" type="password" id="txtPass" size="40" class="input" /></td>
        </tr>
        <tr>
          <td>Your Query </td>
          <td colspan="3"><textarea name="txtQuery" cols="40" rows="5" id="txtQuery" class="textarea"></textarea></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td colspan="3"><input class="button" type="submit" name="Submit" value="Send Message" /></td>
        </tr>
      </table>
        </form> 
      <p><strong>Dispute Basics:</strong><br />
        -You have 30 days after the transaction to file a dispute<br />
      -<a name="_GoBack" id="_GoBack"></a>Only 1 dispute can be filed at one  time for a single transaction</p></div></td>
  </tr>
</table>
</div>
